import axios from 'axios'
const axiosInstance = axios.create({
  baseURL: '/api',
})
axiosInstance.interceptors.response.use(response => {
  let res = response.data
  if (res.code == 200)
    return res
  else if (res.code == 10001) {
    alert('未登录或登陆过期,请登录')
  } else if (res.code === 10002) {
    alert('权限不足')
  }
})
export default axiosInstance